/*
 * 作者：姚俊
 * 功能：添加创新团队的action
 * 日期：2015-05-30
 */
package admin.action.InnPlatform;

import admin.bean.Innovations;
import admin.service.subject.InnovationService;

public class AddInnovationsAction {
	
	private Innovations innovations;
	private String flag;

	public Innovations getInnovations() {
		return innovations;
	}

	public void setInnovations(Innovations innovations) {
		this.innovations = innovations;
	}
	
	public String getFlag() {
		return flag;
	}

	public void setFlag(String flag) {
		this.flag = flag;
	}

	public String execute()
	{
		this.getInnovations().setSubjectId(1);
		System.out.println("现在我们开始进行当中了");
		try {
			new InnovationService().insertInnovations(this.getInnovations());
			this.setFlag("succ");
		} catch (Exception e) {
			// TODO: handle exception
			this.setFlag("succ");
		}

		return "succ";
	}

}
